package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SoilChemOthersMapper;
import com.ruoyi.system.domain.SoilChemOthers;
import com.ruoyi.system.service.ISoilChemOthersService;
import com.ruoyi.common.core.text.Convert;

/**
 * 其它大量元素Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-03-20
 */
@Service
public class SoilChemOthersServiceImpl implements ISoilChemOthersService 
{
    @Autowired
    private SoilChemOthersMapper soilChemOthersMapper;

    /**
     * 查询其它大量元素
     * 
     * @param id 其它大量元素主键
     * @return 其它大量元素
     */
    @Override
    public SoilChemOthers selectSoilChemOthersById(Long id)
    {
        return soilChemOthersMapper.selectSoilChemOthersById(id);
    }

    /**
     * 查询其它大量元素列表
     * 
     * @param soilChemOthers 其它大量元素
     * @return 其它大量元素
     */
    @Override
    public List<SoilChemOthers> selectSoilChemOthersList(SoilChemOthers soilChemOthers)
    {
        return soilChemOthersMapper.selectSoilChemOthersList(soilChemOthers);
    }

    /**
     * 新增其它大量元素
     * 
     * @param soilChemOthers 其它大量元素
     * @return 结果
     */
    @Override
    public int insertSoilChemOthers(SoilChemOthers soilChemOthers)
    {
        soilChemOthers.setCreateTime(DateUtils.getNowDate());
        return soilChemOthersMapper.insertSoilChemOthers(soilChemOthers);
    }

    /**
     * 修改其它大量元素
     * 
     * @param soilChemOthers 其它大量元素
     * @return 结果
     */
    @Override
    public int updateSoilChemOthers(SoilChemOthers soilChemOthers)
    {
        soilChemOthers.setUpdateTime(DateUtils.getNowDate());
        return soilChemOthersMapper.updateSoilChemOthers(soilChemOthers);
    }

    /**
     * 批量删除其它大量元素
     * 
     * @param ids 需要删除的其它大量元素主键
     * @return 结果
     */
    @Override
    public int deleteSoilChemOthersByIds(String ids)
    {
        return soilChemOthersMapper.deleteSoilChemOthersByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除其它大量元素信息
     * 
     * @param id 其它大量元素主键
     * @return 结果
     */
    @Override
    public int deleteSoilChemOthersById(Long id)
    {
        return soilChemOthersMapper.deleteSoilChemOthersById(id);
    }
}
